@charset "UTF-8";

body {
	display: flex;
	height: 100vh;
	width: 100vw;
	flex-direction: column;
}

header {
	display: flex;
	padding: 0 10px;
	justify-content: center;
	align-items: center;
}
header h1 {
	flex: 1;
	font-size: 18px;
	font-weight: 400;
	line-height: 60px;
	color: #333;
}
header a {
	position: relative;
	display: inline-block;
	color: #09f;
	font-size: 14px;
	margin: 0 .8em 0 0;
	padding: .3em .5em;
	border-radius: 3px;
	overflow: hidden;
	background-color: transparent;
}
header a:hover {
	background-color: #f5f5f5;
}

.go-btn {
	position: relative;
	width: 60px;
	height: 32px;
	overflow: hidden;
	font-size: 14px;
	color: #fff;
	border: none;
	border-radius: 2px;
	outline: none;
	cursor: pointer;
	background-color: rgb(0, 102, 255);
}

.animate-tem {
	position: absolute;
	top: 50%;
	left: 50%;
	content: '';
	display: block;
	width: 100px;
	height: 100px;
	margin: -50px;
	transform: scale(0);
	border-radius: 100%;
	background-color: rgba(255, 255, 255, .2);
	animation: go 1.5s ease;
	pointer-events: none;
}

@keyframes go {
	to {
		transform: scale(2);
		opacity: 0;
	}
}

.main-content {
	display: flex;
	flex: 1;
}
.code-display {
	position: relative;
	flex: 1;
	box-sizing: border-box;
	border: 1px solid #eee;
}

.code-area {
	width: 100%;
	height: 100%;
}

.btns-box {
	position: absolute;
	top: .5rem;
	right: 10px;
	z-index: 100;
}
.btns-box button {
	position: relative;
	padding: 4px 6px;
	cursor: pointer;
	background-color: #fff;
	border: 1px solid transparent;
	border-radius: 2px;
	outline: none;
}
.btns-box button:hover {
	border-color: #eee;
}
.btns-box button:after {
	visibility: hidden;
	position: absolute;
	left: 50%;
	display: block;
	padding: 2px 5px;
	color: #fff;
	font-size: 12px;
	white-space: nowrap;
	border-radius: 2px;
	background-color: #333;
	transform: translateX(-50%) translateY(8px);
	pointer-events: none;
}
.btns-box button:hover::after {
	visibility: visible;
}
.copy-btn:after {
	content: '复制'
}
.copy-btn.copied:after {
	content: '复制成功'
}

.download-btn:after {
	content: '下载'
}

/* API */
.api-mod .animate-tem {
	background-color: rgba(0, 153, 255, .2)
}

/* 历史记录 */
.history-mod {
	position: fixed;
	top: 0;
	right: -50vw;
	display: flex;
	flex-direction: column;
	width: 50vw;
	height: 100vh;
	opacity: 0;
	border-left: 1px solid #eee;
	background: #fff;
	z-index: 1000;
	transition: transform .5s ease, opacity .5s ease;
}
.history-mod.show {
	transform: translateX(-50vw);
	opacity: 1;
}
.history-mod header h1 {
	font-size: 16px;
	color: #333;
}
.history-mod header button {
	border: none;
	outline: none;
	font-size: 14px;
	cursor: pointer;
	opacity: .8;
}
.history-mod header button:hover {
	opacity: 1;
}
.history-ul {
	flex: 1;
}
.history-ul li p {
	padding: 10px 0;
	margin: 0 15px;
	border-bottom: 1px solid #eee;
}
.history-ul li:hover {
	background: #f5f5f5;
}